<?php

namespace app\api\controller;

use think\Controller;
use think\Db;
use think\Request;

class Common extends Controller
{

    public static $userId;

    public function _initialize()
    {
        //允许ajax跨域请求
        header('Access-Control-Allow-Origin:*');
    }

//    public function check()
//    {
//
//    }

    public static function apiReturnSU($msg='', $data = [])
    {
        return json(['code'=>1,'msg'=>$msg,'data'=>$data]);
    }

    public static function apiReturnFA($msg='', $data = [])
    {
        return json(['code'=>0,'msg'=>$msg,'data'=>$data]);
    }

}